package com.mt.api.constants.threadlocal;

import com.mt.api.modules.domain.dto.JwtUserDto;

/**
 * @Author: plover
 * @Date: 2020/07/08/1:31 下午
 * @Description:
 */
public class JwtUserThreadLocal {

    private static ThreadLocal<JwtUserDto> localToken = new ThreadLocal<>();

    public static void add(JwtUserDto jwtUserDto) {
        localToken.set(jwtUserDto);
    }

    public static JwtUserDto get() {
        return localToken.get();
    }

    public static void remove() {
        localToken.remove();
    }
}
